<template>
  <van-tabbar v-model="active" active-color="#fc6627" route>
    <van-tabbar-item to="/">
      <span>首页</span>
      <template #icon="{active}">
        <GeekIcon v-if="active" name="home-sel"></GeekIcon>
        <GeekIcon v-else name="home"></GeekIcon>
      </template>
    </van-tabbar-item>
    <van-tabbar-item to="/question">
      <span>问答</span>
      <template #icon="{active}">
        <GeekIcon v-if="active" name="qa-sel"></GeekIcon>
        <GeekIcon v-else name="qa"></GeekIcon>
      </template>
    </van-tabbar-item>
    <van-tabbar-item to="/video">
      <span>视频</span>
      <template #icon="{active}">
        <GeekIcon v-if="active" name="video-sel"></GeekIcon>
        <GeekIcon v-else name="video"></GeekIcon>
      </template>
    </van-tabbar-item>
    <van-tabbar-item to="/user">
      <span>我的</span>
      <template #icon="{active}">
        <GeekIcon v-if="active" name="mine-sel"></GeekIcon>
        <GeekIcon v-else name="mine"></GeekIcon>
      </template>
    </van-tabbar-item>
  </van-tabbar>
</template>

<script>
export default {
  name: 'AppTabbar',
  data () {
    return {
      active: 0
    }
  }
}
</script>

<style></style>
